package org.gd.hellojaxb.privat24.mobipay;

import org.gd.hellojaxb.adapters.DateAdaptersFactory;
import org.gd.hellojaxb.adapters.DoubleAdaptersFactory;
import org.gd.hellojaxb.adapters.IntAdaptersFactory;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;

@XmlRootElement(name = "req_pay")
@XmlAccessorType(XmlAccessType.FIELD)
public class MobilePayRequest {

    @XmlElement(name = "system_id")
    private Integer systemId;
    @XmlElement(name = "oper")
    private static final String operation = "pay";
    @XmlElement(name = "date")
    @XmlJavaTypeAdapter(DateAdaptersFactory.MobilePayDateFormat.class)
    private Date date;
    @XmlElement(name = "idpay")
    @XmlJavaTypeAdapter(IntAdaptersFactory.Long.class)
    private Long payId;
    @XmlElement(name = "card")
    private String card;
    @XmlElement(name = "phone")
    private String phone;
    @XmlElement(name = "amount")
    @XmlJavaTypeAdapter(DoubleAdaptersFactory.Amount.class)
    private Double amount;
    @XmlElement(name = "curr")
    private static final String currency = "980";
    @XmlElement(name = "terminal")
    private static final String terminal = "PRIVAT24";
    @XmlElement(name = "deb")
    private static final String deb = "Y";
    @XmlElement(name = "uid")
    @XmlJavaTypeAdapter(IntAdaptersFactory.Long.class)
    private Long userId;
    @XmlElement(name = "login")
    private String userLogin;
    @XmlElement(name = "ip")
    private String ip;


    public MobilePayRequest() {
    }

    public Integer getSystemId() {
        return systemId;
    }

    public MobilePayRequest setSystemId(Integer systemId) {
        this.systemId = systemId;
        return this;
    }

    public String getOperation() {
        return operation;
    }

    public Date getDate() {
        return date;
    }

    public MobilePayRequest setDate(Date date) {
        this.date = date;
        return this;
    }

    public Long getPayId() {
        return payId;
    }

    public MobilePayRequest setPayId(Long payId) {
        this.payId = payId;
        return this;
    }

    public String getCard() {
        return card;
    }

    public MobilePayRequest setCard(String card) {
        this.card = card;
        return this;
    }

    public String getPhone() {
        return phone;
    }

    public MobilePayRequest setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public Double getAmount() {
        return amount;
    }

    public MobilePayRequest setAmount(Double amount) {
        this.amount = amount;
        return this;
    }

    public String getCurr() {
        return currency;
    }

    public String getTerminal() {
        return terminal;
    }

    public String getDeb() {
        return deb;
    }

    public Long getUserId() {
        return userId;
    }

    public MobilePayRequest setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getUserLogin() {
        return userLogin;
    }

    public MobilePayRequest setUserLogin(String userLogin) {
        this.userLogin = userLogin;
        return this;
    }

    public String getIp() {
        return ip;
    }

    public MobilePayRequest setIp(String ip) {
        this.ip = ip;
        return this;
    }
}
